package com.itheima.demoif;

public class Test007 {
    public static void main(String[] args) {
      int a = 150;
      int b = 160;
      int c = 210;
      //求出最大值
      int tempMax = a > b ? a : b;
      int Max = tempMax > c ? tempMax : c;
      //求取最小值
      int tempMin = a < b ? a : b;
      int Min = tempMin < c ? tempMin : c;
      //求和
      int num = a + b + c;
      //求出中间值
      int d = num - Max-Min;
      System.out.println("三个和尚中身高最大值为:"+Max);
      System.out.println("三个和尚中身高中间为:"+d);
      System.out.println("三个和尚中身高最小值为:"+Min);

    }

}
